/**
 * 
 */
package com.woniuxy.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.woniuxy.mapper.DiscountMapper;
import com.woniuxy.pojo.Discount;
import com.woniuxy.service.DiscountService;

/**
 * @author Fz
 * @date 2019年8月2日 上午10:48:34
 * @param 
 * @return
 */
@Service
@Transactional
public class DiscountServiceImpl implements DiscountService{
	@Resource
	private DiscountMapper discountMapper;
	
	@Override
	public List<Discount> getAllD() {
		return discountMapper.getAllD();
	}

	@Override
	public int updateD(Discount discount) {
		return discountMapper.updateD(discount);
	}

	@Override
	public float findDiscount() {
		return discountMapper.findDiscount();
	}

	@Override
	public float findDiscountB(String mtype) {
		return discountMapper.findDiscountB(mtype);
	}

	@Override
	public int addD(Discount discount) {
		return discountMapper.addD(discount);
	}

	@Override
	public int delD(String dname) {
		return discountMapper.delD(dname);
	}

	@Override
	public List<Discount> selD(String message) {
		return discountMapper.selD("%"+message+"%");
	}
}
